import { createSelector } from '@reduxjs/toolkit';
import { RootState } from 'src/app/rootReducer';

const searchSelector = (state: RootState) => state.search;

export const searchKeySelector = createSelector(searchSelector, (searchState) => searchState.searchKey);

export const searchVideosSelector = createSelector(searchSelector, (searchState) => searchState.videos);

export const searchAttrSelector = createSelector(searchSelector, (searchState) => searchState.searchAttr);
